package com.watercloud.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.pojo.QueryInfo;
import com.pojo.UserInfo;
import com.watercloud.service.UserService;

import java.util.List;
import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    UserService userService;

    @RequestMapping("/getUserInfo")
    public List<UserInfo> getUserInfo(){
        return userService.selectUserInfo();
    }

    @RequestMapping("/selectSpecifiedUser")
    public List<UserInfo> selectSpecifiedUser(QueryInfo queryInfo){
        return userService.selectSpecifiedUser(queryInfo);
    }

    @RequestMapping("/updateMessage")
    public boolean updateMessage(UserInfo userInfo){/*客户端请求服务器端的携带数据hiahiahia*/
        /*res 为数据库的执行结果（数据库的影响行数）*/
        boolean res = userService.update(userInfo);
        return res;
    }

}
